{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 环境测试"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello world!\n"
     ]
    }
   ],
   "source": [
    "print(\"hello world!\")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 安装langchain"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Requirement already satisfied: langchain in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (0.1.16)\n",
      "Requirement already satisfied: PyYAML>=5.3 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain) (6.0.1)\n",
      "Requirement already satisfied: SQLAlchemy<3,>=1.4 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain) (2.0.29)\n",
      "Requirement already satisfied: aiohttp<4.0.0,>=3.8.3 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain) (3.9.5)\n",
      "Requirement already satisfied: async-timeout<5.0.0,>=4.0.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain) (4.0.3)\n",
      "Requirement already satisfied: dataclasses-json<0.7,>=0.5.7 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain) (0.6.4)\n",
      "Requirement already satisfied: jsonpatch<2.0,>=1.33 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain) (1.33)\n",
      "Requirement already satisfied: langchain-community<0.1,>=0.0.32 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain) (0.0.34)\n",
      "Requirement already satisfied: langchain-core<0.2.0,>=0.1.42 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain) (0.1.46)\n",
      "Requirement already satisfied: langchain-text-splitters<0.1,>=0.0.1 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain) (0.0.1)\n",
      "Requirement already satisfied: langsmith<0.2.0,>=0.1.17 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain) (0.1.51)\n",
      "Requirement already satisfied: numpy<2,>=1 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain) (1.26.4)\n",
      "Requirement already satisfied: pydantic<3,>=1 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain) (2.6.3)\n",
      "Requirement already satisfied: requests<3,>=2 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain) (2.31.0)\n",
      "Requirement already satisfied: tenacity<9.0.0,>=8.1.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain) (8.2.3)\n",
      "Requirement already satisfied: aiosignal>=1.1.2 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.3.1)\n",
      "Requirement already satisfied: attrs>=17.3.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (23.2.0)\n",
      "Requirement already satisfied: frozenlist>=1.1.1 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.4.1)\n",
      "Requirement already satisfied: multidict<7.0,>=4.5 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (6.0.5)\n",
      "Requirement already satisfied: yarl<2.0,>=1.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.9.4)\n",
      "Requirement already satisfied: marshmallow<4.0.0,>=3.18.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from dataclasses-json<0.7,>=0.5.7->langchain) (3.21.1)\n",
      "Requirement already satisfied: typing-inspect<1,>=0.4.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from dataclasses-json<0.7,>=0.5.7->langchain) (0.9.0)\n",
      "Requirement already satisfied: jsonpointer>=1.9 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from jsonpatch<2.0,>=1.33->langchain) (2.4)\n",
      "Requirement already satisfied: packaging<24.0,>=23.2 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain-core<0.2.0,>=0.1.42->langchain) (23.2)\n",
      "Requirement already satisfied: orjson<4.0.0,>=3.9.14 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langsmith<0.2.0,>=0.1.17->langchain) (3.10.1)\n",
      "Requirement already satisfied: annotated-types>=0.4.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from pydantic<3,>=1->langchain) (0.6.0)\n",
      "Requirement already satisfied: pydantic-core==2.16.3 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from pydantic<3,>=1->langchain) (2.16.3)\n",
      "Requirement already satisfied: typing-extensions>=4.6.1 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from pydantic<3,>=1->langchain) (4.10.0)\n",
      "Requirement already satisfied: charset-normalizer<4,>=2 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from requests<3,>=2->langchain) (3.3.2)\n",
      "Requirement already satisfied: idna<4,>=2.5 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from requests<3,>=2->langchain) (3.6)\n",
      "Requirement already satisfied: urllib3<3,>=1.21.1 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from requests<3,>=2->langchain) (2.2.1)\n",
      "Requirement already satisfied: certifi>=2017.4.17 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from requests<3,>=2->langchain) (2024.2.2)\n",
      "Requirement already satisfied: greenlet!=0.4.17 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from SQLAlchemy<3,>=1.4->langchain) (3.0.3)\n",
      "Requirement already satisfied: mypy-extensions>=0.3.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from typing-inspect<1,>=0.4.0->dataclasses-json<0.7,>=0.5.7->langchain) (1.0.0)\n"
     ]
    }
   ],
   "source": [
    "! pip install --upgrade langchain -i https://pypi.org/simple"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 安装依赖\n",
    "\n",
    "- 安装openai的api包\n",
    "- 或者使用Baichuan、ChatGLM等开源包"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting openai==v0.28.1\n",
      "  Using cached openai-0.28.1-py3-none-any.whl.metadata (11 kB)\n",
      "Requirement already satisfied: requests>=2.20 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from openai==v0.28.1) (2.31.0)\n",
      "Requirement already satisfied: tqdm in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from openai==v0.28.1) (4.66.2)\n",
      "Requirement already satisfied: aiohttp in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from openai==v0.28.1) (3.9.5)\n",
      "Requirement already satisfied: charset-normalizer<4,>=2 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from requests>=2.20->openai==v0.28.1) (3.3.2)\n",
      "Requirement already satisfied: idna<4,>=2.5 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from requests>=2.20->openai==v0.28.1) (3.6)\n",
      "Requirement already satisfied: urllib3<3,>=1.21.1 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from requests>=2.20->openai==v0.28.1) (2.2.1)\n",
      "Requirement already satisfied: certifi>=2017.4.17 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from requests>=2.20->openai==v0.28.1) (2024.2.2)\n",
      "Requirement already satisfied: aiosignal>=1.1.2 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from aiohttp->openai==v0.28.1) (1.3.1)\n",
      "Requirement already satisfied: attrs>=17.3.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from aiohttp->openai==v0.28.1) (23.2.0)\n",
      "Requirement already satisfied: frozenlist>=1.1.1 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from aiohttp->openai==v0.28.1) (1.4.1)\n",
      "Requirement already satisfied: multidict<7.0,>=4.5 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from aiohttp->openai==v0.28.1) (6.0.5)\n",
      "Requirement already satisfied: yarl<2.0,>=1.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from aiohttp->openai==v0.28.1) (1.9.4)\n",
      "Requirement already satisfied: async-timeout<5.0,>=4.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from aiohttp->openai==v0.28.1) (4.0.3)\n",
      "Requirement already satisfied: colorama in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from tqdm->openai==v0.28.1) (0.4.6)\n",
      "Using cached openai-0.28.1-py3-none-any.whl (76 kB)\n",
      "Installing collected packages: openai\n",
      "  Attempting uninstall: openai\n",
      "    Found existing installation: openai 1.23.6\n",
      "    Uninstalling openai-1.23.6:\n",
      "      Successfully uninstalled openai-1.23.6\n",
      "Successfully installed openai-0.28.1\n",
      "Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple\n",
      "Requirement already satisfied: chatglm-llm==1.7.4 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (1.7.4)\n",
      "Requirement already satisfied: aiohttp in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from chatglm-llm==1.7.4) (3.9.5)\n",
      "Requirement already satisfied: sse-starlette in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from chatglm-llm==1.7.4) (2.1.0)\n",
      "Requirement already satisfied: requests in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from chatglm-llm==1.7.4) (2.31.0)\n",
      "Requirement already satisfied: termcolor in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from chatglm-llm==1.7.4) (2.4.0)\n",
      "Requirement already satisfied: tqdm in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from chatglm-llm==1.7.4) (4.66.2)\n",
      "Requirement already satisfied: gptcache in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from chatglm-llm==1.7.4) (0.1.42)\n",
      "Requirement already satisfied: numpy in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from chatglm-llm==1.7.4) (1.26.4)\n",
      "Requirement already satisfied: uvicorn in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from chatglm-llm==1.7.4) (0.27.1)\n",
      "Requirement already satisfied: pypdf in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from chatglm-llm==1.7.4) (4.2.0)\n",
      "Requirement already satisfied: scikit-learn in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from chatglm-llm==1.7.4) (1.4.2)\n",
      "Requirement already satisfied: sqlalchemy==2.0.22 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from chatglm-llm==1.7.4) (2.0.22)\n",
      "Requirement already satisfied: pydantic==1.10.9 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from chatglm-llm==1.7.4) (1.10.9)\n",
      "Requirement already satisfied: langchain==0.0.325 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from chatglm-llm==1.7.4) (0.0.325)\n",
      "Requirement already satisfied: fastapi==0.104.1 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from chatglm-llm==1.7.4) (0.104.1)\n",
      "Requirement already satisfied: unstructured in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from chatglm-llm==1.7.4) (0.13.4)\n",
      "Requirement already satisfied: loguru in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from chatglm-llm==1.7.4) (0.7.2)\n",
      "Requirement already satisfied: anyio<4.0.0,>=3.7.1 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from fastapi==0.104.1->chatglm-llm==1.7.4) (3.7.1)\n",
      "Requirement already satisfied: starlette<0.28.0,>=0.27.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from fastapi==0.104.1->chatglm-llm==1.7.4) (0.27.0)\n",
      "Requirement already satisfied: typing-extensions>=4.8.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from fastapi==0.104.1->chatglm-llm==1.7.4) (4.10.0)\n",
      "Requirement already satisfied: cachetools in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from gptcache->chatglm-llm==1.7.4) (5.3.3)\n",
      "Requirement already satisfied: PyYAML>=5.3 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain==0.0.325->chatglm-llm==1.7.4) (6.0.1)\n",
      "Requirement already satisfied: async-timeout<5.0.0,>=4.0.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain==0.0.325->chatglm-llm==1.7.4) (4.0.3)\n",
      "Requirement already satisfied: dataclasses-json<0.7,>=0.5.7 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain==0.0.325->chatglm-llm==1.7.4) (0.6.4)\n",
      "Requirement already satisfied: jsonpatch<2.0,>=1.33 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain==0.0.325->chatglm-llm==1.7.4) (1.33)\n",
      "Requirement already satisfied: langsmith<0.1.0,>=0.0.52 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain==0.0.325->chatglm-llm==1.7.4) (0.0.92)\n",
      "Requirement already satisfied: tenacity<9.0.0,>=8.1.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langchain==0.0.325->chatglm-llm==1.7.4) (8.2.3)\n",
      "Requirement already satisfied: greenlet!=0.4.17 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from sqlalchemy==2.0.22->chatglm-llm==1.7.4) (3.0.3)\n",
      "Requirement already satisfied: aiosignal>=1.1.2 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from aiohttp->chatglm-llm==1.7.4) (1.3.1)\n",
      "Requirement already satisfied: attrs>=17.3.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from aiohttp->chatglm-llm==1.7.4) (23.2.0)\n",
      "Requirement already satisfied: frozenlist>=1.1.1 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from aiohttp->chatglm-llm==1.7.4) (1.4.1)\n",
      "Requirement already satisfied: multidict<7.0,>=4.5 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from aiohttp->chatglm-llm==1.7.4) (6.0.5)\n",
      "Requirement already satisfied: yarl<2.0,>=1.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from aiohttp->chatglm-llm==1.7.4) (1.9.4)\n",
      "Requirement already satisfied: charset-normalizer<4,>=2 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from requests->chatglm-llm==1.7.4) (3.3.2)\n",
      "Requirement already satisfied: idna<4,>=2.5 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from requests->chatglm-llm==1.7.4) (3.6)\n",
      "Requirement already satisfied: urllib3<3,>=1.21.1 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from requests->chatglm-llm==1.7.4) (2.2.1)\n",
      "Requirement already satisfied: certifi>=2017.4.17 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from requests->chatglm-llm==1.7.4) (2024.2.2)\n",
      "Requirement already satisfied: colorama>=0.3.4 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from loguru->chatglm-llm==1.7.4) (0.4.6)\n",
      "Requirement already satisfied: win32-setctime>=1.0.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from loguru->chatglm-llm==1.7.4) (1.1.0)\n",
      "Requirement already satisfied: scipy>=1.6.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from scikit-learn->chatglm-llm==1.7.4) (1.12.0)\n",
      "Requirement already satisfied: joblib>=1.2.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from scikit-learn->chatglm-llm==1.7.4) (1.4.0)\n",
      "Requirement already satisfied: threadpoolctl>=2.0.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from scikit-learn->chatglm-llm==1.7.4) (3.4.0)\n",
      "Requirement already satisfied: chardet in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured->chatglm-llm==1.7.4) (5.2.0)\n",
      "Requirement already satisfied: filetype in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured->chatglm-llm==1.7.4) (1.2.0)\n",
      "Requirement already satisfied: python-magic in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured->chatglm-llm==1.7.4) (0.4.27)\n",
      "Requirement already satisfied: lxml in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured->chatglm-llm==1.7.4) (5.2.1)\n",
      "Requirement already satisfied: nltk in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured->chatglm-llm==1.7.4) (3.8.1)\n",
      "Requirement already satisfied: tabulate in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured->chatglm-llm==1.7.4) (0.9.0)\n",
      "Requirement already satisfied: beautifulsoup4 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured->chatglm-llm==1.7.4) (4.12.3)\n",
      "Requirement already satisfied: emoji in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured->chatglm-llm==1.7.4) (2.11.1)\n",
      "Requirement already satisfied: python-iso639 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured->chatglm-llm==1.7.4) (2024.2.7)\n",
      "Requirement already satisfied: langdetect in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured->chatglm-llm==1.7.4) (1.0.9)\n",
      "Requirement already satisfied: rapidfuzz in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured->chatglm-llm==1.7.4) (3.8.1)\n",
      "Requirement already satisfied: backoff in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured->chatglm-llm==1.7.4) (2.2.1)\n",
      "Requirement already satisfied: unstructured-client in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured->chatglm-llm==1.7.4) (0.22.0)\n",
      "Requirement already satisfied: wrapt in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured->chatglm-llm==1.7.4) (1.16.0)\n",
      "Requirement already satisfied: click>=7.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from uvicorn->chatglm-llm==1.7.4) (8.1.7)\n",
      "Requirement already satisfied: h11>=0.8 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from uvicorn->chatglm-llm==1.7.4) (0.14.0)\n",
      "Requirement already satisfied: sniffio>=1.1 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from anyio<4.0.0,>=3.7.1->fastapi==0.104.1->chatglm-llm==1.7.4) (1.3.1)\n",
      "Requirement already satisfied: exceptiongroup in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from anyio<4.0.0,>=3.7.1->fastapi==0.104.1->chatglm-llm==1.7.4) (1.2.0)\n",
      "Requirement already satisfied: marshmallow<4.0.0,>=3.18.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from dataclasses-json<0.7,>=0.5.7->langchain==0.0.325->chatglm-llm==1.7.4) (3.21.1)\n",
      "Requirement already satisfied: typing-inspect<1,>=0.4.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from dataclasses-json<0.7,>=0.5.7->langchain==0.0.325->chatglm-llm==1.7.4) (0.9.0)\n",
      "Requirement already satisfied: jsonpointer>=1.9 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from jsonpatch<2.0,>=1.33->langchain==0.0.325->chatglm-llm==1.7.4) (2.4)\n",
      "Requirement already satisfied: soupsieve>1.2 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from beautifulsoup4->unstructured->chatglm-llm==1.7.4) (2.5)\n",
      "Requirement already satisfied: six in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from langdetect->unstructured->chatglm-llm==1.7.4) (1.16.0)\n",
      "Requirement already satisfied: regex>=2021.8.3 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from nltk->unstructured->chatglm-llm==1.7.4) (2023.12.25)\n",
      "Requirement already satisfied: deepdiff>=6.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured-client->unstructured->chatglm-llm==1.7.4) (7.0.1)\n",
      "Requirement already satisfied: jsonpath-python>=1.0.6 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured-client->unstructured->chatglm-llm==1.7.4) (1.0.6)\n",
      "Requirement already satisfied: mypy-extensions>=1.0.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured-client->unstructured->chatglm-llm==1.7.4) (1.0.0)\n",
      "Requirement already satisfied: packaging>=23.1 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured-client->unstructured->chatglm-llm==1.7.4) (23.2)\n",
      "Requirement already satisfied: python-dateutil>=2.8.2 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from unstructured-client->unstructured->chatglm-llm==1.7.4) (2.8.2)\n",
      "Requirement already satisfied: ordered-set<4.2.0,>=4.1.0 in d:\\programdata\\anaconda3\\envs\\py310\\lib\\site-packages (from deepdiff>=6.0->unstructured-client->unstructured->chatglm-llm==1.7.4) (4.1.0)\n"
     ]
    }
   ],
   "source": [
    "! pip install openai==v0.28.1 -i https://pypi.org/simple\n",
    "! pip install chatglm-llm==1.7.4"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "py310",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.13"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
